import './App.css';
import { BrowserRouter, Routes, Route, Navigate } from 'react-router-dom'; // 使用最新的导入方式
import Home from './components/Home';
import About from './components/About';
const BASE_NAME = window.__POWERED_BY_QIANKUN__ ? "/react" : "/";

function App() {
  return (
    <BrowserRouter basename={BASE_NAME}>
      <Routes>
        <Route path="/" element={<Navigate to="reactHome" replace />} />
        <Route path="/reactHome" element={<Home />} />
        <Route path="/reactAbout" element={<About />} />
      </Routes>
    </BrowserRouter>
  );
}

export default App;